# -*- coding: utf-8 -*-

# 
# this is help file, 
#
# Created: Thu Apr 21 12:50:32 2011
#      
#  
#  date             author          issues
#  2011-Apr-11   Wan            creator
#
#
#

from win32api import GetFileVersionInfo, LOWORD, HIWORD

class util():
    
    def get_version_number (self,  filename):
        try:
            info = GetFileVersionInfo (filename, "\\")
            ms = info['FileVersionMS']
            ls = info['FileVersionLS']
            return HIWORD (ms), LOWORD (ms), HIWORD (ls), LOWORD (ls)
        except:
            return 0,0,0,0
    
    
